#include <stdio.h>
#include <stdlib.h>
#include "proc.h"

void proctree_exit()
{
	free(proc_tree);
}

int main(int argc, char *argv[])
{
	build_index();
	build_tree();
	mark_level();
	int i;
	int rooti;
	for (i = 0; i < get_size(); i++) {
		if (proc_tree[i].ppid == 0) {
			print_tree(i);
		}
	}
	
	atexit(proctree_exit);
	return 0;
}

